<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <script src="../jQuery-3.6.3.min.js"> </script>
    <script>
        $(function () {
            var str = {
                name: "hello",
                age: 300
            }
            var str = $.param(str);
            console.log(str);
        })
    </script>
</head>

<body>

</body>

</html>